package rjh

type ErrProgress int

const (
	EP_HTTP ErrProgress = iota
	EP_ParseRequestURL
	EP_ParseRequestBody
	EP_SerializeResponse
)

type ErrRJHttp struct {
	Err      error
	Progress ErrProgress
}

type ErrorWithStatus struct {
	Status int
	Err    error
}

func NewStatusError(err error, status int) error {
	return &ErrorWithStatus{Err: err, Status: status}
}

func (e *ErrorWithStatus) Error() string {
	return e.Err.Error()
}
